package com.acme.task3;

/**
 * Class which prints a set of numbers.
 * @author belDser
 */
public class Task3Arrays
{
	/**
	 * The main() method.
	 * @param args command line arguments
	 */
	public static void main(String[] args)
	{
		final int N = 50;
		int[] array = new int[N];
		
		for (int i = 1; i <= N; i ++)
		{
			array[i-1] = i;
			if (i % 3 == 0)
			{
				System.out.println(i + " is multiple of 3");
			}
			else
			{
				System.out.println(i);
			}
		}
		System.out.println(avg(array));
	}
	
	/**
	 * The avg() method.
	 * @param a array of integer
	 * @return arithmetic mean
	 */
	public static double avg(int[] a)
	{
		double res = 0;
		
		for (int i : a)
		{
			res += i;
		}
		res /= a.length;
		
		return res;		
	}
}